# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=libkexiv2
pkgver=24.02.2
pkgrel=0
pkgdesc="Library to manipulate picture metadata"
url="https://www.kde.org/applications/graphics"
arch="all !armhf" # extra-cmake-modules
license="GPL-2.0-or-later"
makedepends="
	exiv2-dev
	extra-cmake-modules
	qt6-qt5compat-dev
	qt6-qtbase-dev
	samurai
	"
subpackages="$pkgname-dev"
_repo_url="https://invent.kde.org/graphics/libkexiv2.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/libkexiv2-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DBUILD_WITH_QT6=ON \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
2d2ca4060bde9919f040dea4f059d24b4162d89d60292787e09408d8188c6747513418ec83ec642bf08d847c2a6bbcc02028ecc7fd3780ab60feed31da5bca03  libkexiv2-24.02.2.tar.xz
"
